import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const Layout = () => import('@/layout')
const Dashboard = () => import('@/views/dashboard')

const routes = [
	// {
  //   path: '/redirect',
  //   component: Layout,
  //   hidden: true,
  //   children: [
  //     {
  //       path: '/redirect/:path(.*)',
  //       component: () => import('@/views/redirect/index')
  //     }
  //   ]
  // },
	{
    path: '/login',
    component: () => import('@/views/login'),
    hidden: true
  },
  {
    path: '/',
		component: Layout,
		redirect: '/dashboard',
		children: [
			{
				path: 'dashboard',
				name: 'Dashboard',
				component: Dashboard,
				meta: {
					title: 'Dashboard',
					icon: '',
					// affix: true
				}
			}
		]
  }
]

const router = new VueRouter({
	mode: 'hash',
  routes
})

export default router
